from rest_framework.serializers import ModelSerializer
from rest_framework import serializers
from .models import *

# class JournalismSer(ModelSerializer):
#     class Meta:
#         model = Journalism
#         fields = '__all__'
#
# class AdvertisingSer(ModelSerializer):
#     class Meta:
#         model = Advertising
#         fields = '__all__'



class BooksSer(ModelSerializer):
    class Meta:
        model = Books
        fields = '__all__'

class Show_ClassifySer(ModelSerializer):
    book = BooksSer(many=True, read_only=True)
    class Meta:
        model = Classify
        fields = '__all__'

class ClassifySer(ModelSerializer):
    class Meta:
        model = Classify
        fields = '__all__'

class UserSer(ModelSerializer):
    class Meta:
        model = User
        fields = '__all__'

class CateSer(ModelSerializer):
    class Meta:
        model = Category
        fields = '__all__'

class GoodsSer(ModelSerializer):
    class Meta:
        model = Goods
        fields = '__all__'